<template>
    <div>
      <el-table :data="tableData" border>
        <el-table-column align="center" prop="create_time" label="购买时间" />
        <el-table-column align="center" prop="buy_num" label="购买数量" />
        <el-table-column align="center" prop="pay_amount" label="支付金额（元）" />
        <el-table-column align="center" prop="buy_type_name" label="类型" />
        <el-table-column align="center" prop="username" label="操作人" />
      </el-table>
      <custom-page ref="customPage" :total="total" @getList="getList"></custom-page>
    </div>
  </template>
  
  <script>
  import { getRiskAbCreditBuyLog } from "@/api/marketing"
  import customPage from "@/components/customPage"
  export default {
    components: { customPage },
    data() {
      return {
        tableData: [],
        total: 0
      }
    },
    methods: {
      getList() {
        const { page, pageSize } = this.$refs.customPage;
        getRiskAbCreditBuyLog({
          page,
          pageSize
        }).then(res => {
          const { data, total } = res
          this.tableData = data || []
          this.total = total || 0
        })
      }
    },
    mounted() {
      this.getList();
    }
  }
  </script>
  
  <style lang="scss" scoped>
  
  </style>
  